package JDBC;

import java.sql.Connection;
import java.sql.Statement;
import java.util.Collections;

public class JDBCDemo1 {
    public static void main(String[] args) {
        try(Connection con = DBUtil.getConnection();) {
            Statement sta = con.createStatement();
            String sql ="CREATE TABLE userinfo( " +
                    "                id INT PRIMARY KEY AUTO_INCREMENT, " +
                    "                username VARCHAR(30), " +
                    "                password VARCHAR(30), " +
                    "                nickname VARCHAR(30), " +
                    "                age INT(3) " +
                    "            )";
            sta.execute(sql);
            System.out.println("执行完毕!");
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
}
